﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PayDeposit.aspx.cs" Inherits="YY.Web.MyAgent.PayDeposit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>缴纳保证金</title>
    <link href="/jQuery/PlugIns/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="/skin/default/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="/jQuery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/jQuery/PlugIns/Validform/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/jQuery/PlugIns/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/common.js"></script>
    <script type="text/javascript">
        $(function () {
            PayManager.init();
        });
        var PayManager = {
            init: function () {
                $("#a_code").html("获取验证码");
            },
            _event: {
                getCode: function () {
                    var mobile = $("#lbl_mobile").val();
                    if (mobile == "") {
                        //.
                    } else {
                        $.post("/Handler/SmsHandler.ashx?action=getcode", { "mobile": mobile }, function (data, status) {
                            if (status == "success") {
                                if (data.length == 6) {
                                    $("#ldf_code").val(data);
                                    $("#span_code").html(data);
                                    /*发送验证码计时*/
                                    var time = 60;
                                    function timeCountDown() {
                                        if (time == 0) {
                                            clearInterval(timer);//停止倒计时
                                            $("#a_code").addClass("btn").removeClass("btn default").html("再次发送");//显示发送按钮
                                            $('#a_code').attr('onclick', "sendCodeToPwd();");
                                        }
                                        else {
                                            $("#a_code").removeClass("btn").addClass("btn default").html("(" + time + ")");//显示发送按钮
                                            $('#a_code').removeAttr('onclick');//去掉a标签中的onclick事件
                                        }
                                        time--;
                                        return false;
                                    }
                                    var timer = setTimeout(timeCountDown, 1000);
                                }
                            } 
                        });
                    }
                }
            }
        };
    </script>
</head>
<body class="mainbody">
    <form id="form1" runat="server">
        <asp:HiddenField ID="lbl_mobile" runat="server" />
        <asp:HiddenField ID="ldf_code" runat="server" />
        <!--导航栏-->
        <div class="location">
            <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
            <a href="../Center.aspx" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <span>缴纳保证金</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a class="selected" href="javascript:;">缴纳保证金</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="tab-content">
            <dl>
                <dt>*获取验证码</dt>
                <dd>
                    <span style="width: 200px; font-size: 20px;" id="span_code"></span>
                    <a class="btn" id="a_code" style="width: 60px" onclick="PayManager._event.getCode();">获取验证码</a>
                </dd>
            </dl>
            <dl>
                <dt>*保证金</dt>
                <dd>
                    <asp:TextBox ID="txtFund" runat="server" datatype="m" CssClass="input normal"></asp:TextBox>
                    <span class="Validform_checktip">保证金将从银富通扣取，请确保银富通资金充裕！</span>
                </dd>
            </dl>
        </div>
        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-wrap">
                <asp:Button ID="btnSubmitPay" runat="server" Text="支付" CssClass="btn green" OnClick="btnSubmitPay_Click" />
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
        </div>
        <!--/工具栏-->
    </form>
</body>
</html>
